<h1>Listing cases</h1>
<%= render :partial=> 'layouts/datatable'%>
<table id="list_table" cellpadding="5" cellspacing="0" border="2" width="100%">
 <thead>
  <tr>
    <th>Id</th>
    <th>Case num</th>
    <th>Case status</th>
    <th>Employee</th>
    <th>Client</th>
    <th>Location</th>
    <th></th>
    <th></th>
  </tr>
 </thead>
 <tbody>

<% @cases.each do |cas| %>
  <tr>
    <td><%= cas.id %></td>
    <td><%= cas.case_num  %></td>
    <td><%= cas.case_status %></td>
    <td><%= cas.employee.full_name  unless cas.employee.nil? %></td>
    <td><%= cas.client.full_name unless cas.client.nil? || cas.client.full_name.nil? %></td>
    <td><%= cas.hearing_location %></td>
    <td><%= link_to 'Show', cas %></td>
    <td><%= link_to 'Edit', edit_case_path(cas) %></td>
    <td><%= link_to 'Destroy', cas, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>
</tbody>

<br />


